﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThreeByte.ActiveDeck.Data;
using System.Xml.Linq;
using ThreeByte.ActiveDeck.Content;
using ThreeByte.ActiveDeck.Service;

namespace ThreeByte.ActiveDeck.Config
{
    public class PresentationPageConfiguration
    {
        public Dictionary<Guid, GraphicResource> Resources{
            get;
            private set;
        }

        public Dictionary<Guid, VideoResource> MediaResources {
            get;
            private set;
        }

        public XElement ConfigXml {
            get;
            set;
        }

        public PresentationPageConfiguration() {
            Resources = new Dictionary<Guid, GraphicResource>();
            MediaResources = new Dictionary<Guid, VideoResource>();
        }

        public void ReplaceGraphicResourceID(Guid original, Guid replacement) {
            ConfigXml = XElement.Parse(ConfigXml.ToString().Replace(original.ToString(), replacement.ToString()));
        }

    }
}
